package com.smarthome.ipc;


/**
 * 小区工控机保持和服务器的长连接
 * 
 * @author add by denghw 2015/11/15
 *
 */
//@Service
//public class IpcClientKeepAliveTask {
//
//    private static final Logger LOGGER = LoggerFactory.getLogger(IpcClientKeepAliveTask.class);
//    private final static String PRE_LOGGER = "[IpcClientKeepAliveTask]";
//
//    @Scheduled(initialDelay = 30 * 1000, fixedRate = 60 * 1000)
//    public void getHkdoorsState() {
//        try {
//            if (IpcClientMain.getConnector().isActive() && IpcClientMain.getSession().isConnected() && !IpcClientMain.getSession().isClosing())
//                return;
//            IpcClientMain.setInstance(null);
//            IpcClientMain.getInstance();
//            LOGGER.info(PRE_LOGGER + "工控机和云后台保持连接成功.");
//        } catch (Exception e) {
//            // TODO Auto-generated catch block
//            LOGGER.info(PRE_LOGGER + "工控机和云后台保持连接产生异常[" + e.getMessage() + "].");
//        }
//    }
//
//}
